'''
Created on 2010-2-12

@author: summit

Provides the InternalError, StateError,
ContainerEmpty and ContainerFull exception classes.
'''

import sys
import exceptions

class InternalError(Exception):
    '''
    Raised when situation arises that should never occur.
    '''


class StateError(Exception):
    '''
    Raised when an operation on an object is not allowed
    due the state of that object.
    '''
    pass

class ContainerEmpty(StateError):
    '''
    Raised when a container operation fails because the container is empty.
    '''
    pass

class ContainerFull(StateError):
    '''
    Raised when a container operation fails because the container is full.
    '''
    pass

def main(*argv):
    "Exceptions test program."
    print main.__doc__
    return 0

if __name__ == "__main__":
    sys.exit(main(*sys.argv))